package com.avblog.console.convert;

public class WordRun{
	private String word;
	private char nextChar;
	private boolean useNextChar;
	private WordRunKind kind;
	
	public WordRun(){
		word = null;
		nextChar = ' ';
		useNextChar = false;
	}
	
	public WordRun(String word){
		this.word = word;
		nextChar = ' ';
		useNextChar = false;
	}
	
	public WordRun(String word, char ch){
		this.word = word;
		nextChar = ch;
		useNextChar = true;
	}
	
	public void setWord(String word){
		this.word = word;
	}
	
	public String getWord(){
		return word;
	}
	
	public void setNextChar(char ch){
		this.nextChar = ch;
	}
	
	public char getNextChar(){
		return this.nextChar;
	}
	
	public void setUseNextChar(boolean isUseNext){
		this.useNextChar = isUseNext;
	}
	
	public boolean isUseNextChar(){
		return this.useNextChar;
	}
	
	public void setKind(WordRunKind kind){
		this.kind = kind;
	}
	
	public WordRunKind getKind(){
		return this.kind;
	}
	
	@Override
	public String toString(){
		if(useNextChar)
			return word + nextChar;
		return word;
	}
}